package org.budo.aliyun.sdk;

/**
 * @author lmw
 */
public enum BudoAliyunRegion {
    CN_HANGZHOU("cn-hangzhou"),

    HUADONG_1("cn-hangzhou"),

    CN_SHENZHEN("cn-shenzhen");

    private String id;

    BudoAliyunRegion(String id) {
        this.id = id;
    }

    public String getId() {
        return this.id;
    }

    public static BudoAliyunRegion of(String id) {
        BudoAliyunRegion[] regions = BudoAliyunRegion.values();
        for (BudoAliyunRegion region : regions) {
            if (region.getId().equals(id)) {
                return region;
            }
        }

        throw new RuntimeException("not found enum BudoAliyunRegion of " + id);
    }
}